package com.example.farmer.Activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.example.farmer.R;

public class SendMessageActivity extends AppCompatActivity {
    private EditText messageEditText;
    private Button sendMessageButton;

@Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.fragment_xiaoxi);
    sendMessageButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            String message = messageEditText.getText().toString();
            sendMessage(message);
        }
    });
}
private void sendMessage(String message){
    Toast.makeText(this,"消息发送功能:" + message,Toast.LENGTH_SHORT).show();
}
}

